import request from "@/utils/request";

// 获取商品列表
const getItems = (params = {}) => request.get("/itemLists", { params });
// 新增商品
const addItem = (params = {}) => request.post("/addItem", params);
// 获取商品详情
const getItem = (params = {}) => request.get("/itemDetail", { params });
// 修改商品
const updateItem = (params = {}) => request.put("/updateItem", params);
// 删除商品
const delItem = (id) => request.delete("/delItem", { params: { id } });
export { getItems, addItem, getItem, updateItem, delItem };
